<?php echo $html->css('/news/css/page/other');?>
<?php 
    $category = ClassRegistry::init('news.NewsCategory')->find('first', array(
			'conditions'	=> array(
				'NewsCategory.alias <>'	=> $alias,
				'NewsCategory.id <>'	=> 1
			),
            'fields'	=> array('NewsCategory.name', 'NewsCategory.alias'),
    ));
    $other_news = ClassRegistry::init('news.News')->find('all', array(
			'conditions'	=> array(
				'NewsCategory.alias'	=> $category['NewsCategory']['alias'],
                'is_published'   => 1
			),
			'fields'	=> array('News.image', 'News.alias', 'News.title', 'News.news_date', 'News.description'),
			'contain'	=> array(),
			'limit'		=> 5,
			'order'		=> 'News.news_date desc, News.created desc',
			'joins' => array(
				array(
					'table' => 'news_middle',
					'type' => 'INNER',
					'alias' => 'ReferenceCategory',
					'conditions' => array(
						"News.id = ReferenceCategory.page_id"
					)
				),
				array(
					'table' => 'news_categories',
					'type' => 'INNER',
					'alias' => 'NewsCategory',
					'conditions' => array(
						"NewsCategory.id = ReferenceCategory.category_id"
					)
				)
			),
			
		));
?>
<h4 class="articles"><?php  echo $category['NewsCategory']['name'];?></h4>
<div class="wd-feature">
	<ul class="wd-list-category">
		<?php foreach ($other_news as $item):?>
			<li>
                <a href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'view', $item['News']['alias'], $category['NewsCategory']['alias']));?>"><img class="wd-img-news" src="<?php if($item['News']['image']) echo $html->url('/').'files/news/'.$html->getThumbnailName($item['News']['image']); else echo $html->url('/files/news/no-picture.jpg');?>" alt=""/></a>
                <div class="wd-sub-title"><h3 class="wd-st1"><a href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'view', $item['News']['alias'], $category['NewsCategory']['alias']));?>"><?php echo $this->text->new_truncate($item['News']['title'], 35)?><span>(<?php echo date("d/m/Y", strtotime($item['News']['news_date']));?>)</span></a></h3></div>
                <p><?php echo $this->text->new_truncate(strip_tags($item['News']['description']), 100); ?></p>
            </li>
		<?php endforeach;?>
    </ul>
</div>